<?php

namespace App\Http\Requests;

use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class SendSmsCodeRequest extends AbstractRequest
{
    /**
     * 不是手机号则直接抛出404异常
     */
    protected function validate()
    {
        if (!is_mobile($this->route('mobile'))) {
            throw new NotFoundHttpException;
        }
    }
}
